<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
    "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="GNU source-highlight 2.1.2
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite">
<title>../../../../dev/cvs-5_0-branch/marvin/examples/applets/source/spacedisplay.html</title>
<link rel="stylesheet" href="../../javacode.css" type="text/css">
</head>
<body>
<pre><tt><span class="keyword">&lt;HTML&gt;</span>
<span class="keyword">&lt;HEAD&gt;</span>
<span class="keyword">&lt;meta</span><span class="normal"> </span><span class="type">NAME</span><span class="symbol">=</span><span class="string">"</span><span class="string">author</span><span class="string">"</span><span class="normal"> </span><span class="type">CONTENT</span><span class="symbol">=</span><span class="string">"</span><span class="string">Judit Vasko-Szedlar</span><span class="string">"</span><span class="keyword">&gt;</span>
<span class="keyword">&lt;link</span><span class="normal"> </span><span class="type">REL</span><span class="symbol">=</span><span class="string">"</span><span class="string">stylesheet</span><span class="string">"</span><span class="normal"> </span><span class="type">TYPE</span><span class="symbol">=</span><span class="string">"</span><span class="string">text/css</span><span class="string">"</span><span class="normal"> </span><span class="type">HREF</span><span class="symbol">=</span><span class="string">"</span><span class="string">../../../marvinmanuals.css</span><span class="string">"</span><span class="normal"> </span><span class="type">TITLE</span><span class="symbol">=</span><span class="string">"</span><span class="string">Style</span><span class="string">"</span><span class="keyword">&gt;</span>

<span class="keyword">&lt;TITLE&gt;</span><span class="normal">MarvinSpace Example</span><span class="keyword">&lt;/TITLE&gt;</span>

<span class="keyword">&lt;script</span><span class="normal"> </span><span class="type">LANGUAGE</span><span class="symbol">=</span><span class="string">"</span><span class="string">javascript</span><span class="string">"</span><span class="keyword">&gt;</span>
<span class="keyword">function</span><span class="normal"> </span><span class="function">showSecondary</span><span class="symbol">(</span><span class="symbol">)</span>
<span class="cbracket">{</span>
<span class="normal">document</span><span class="symbol">.</span><span class="normal">MSpaceApplet</span><span class="symbol">.</span><span class="function">setProperty</span><span class="symbol">(</span><span class="string">"ShowSecondaryStructure"</span><span class="symbol">,</span><span class="number">1</span><span class="symbol">)</span><span class="symbol">;</span>
<span class="normal">document</span><span class="symbol">.</span><span class="normal">MSpaceApplet</span><span class="symbol">.</span><span class="function">setProperty</span><span class="symbol">(</span><span class="string">"SecondaryStructure.ColorType"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Chain"</span><span class="symbol">)</span><span class="symbol">;</span>
<span class="normal">document</span><span class="symbol">.</span><span class="normal">MSpaceApplet</span><span class="symbol">.</span><span class="function">setProperty</span><span class="symbol">(</span><span class="string">"MacroMolecule.DrawType"</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Spacefill"</span><span class="symbol">)</span><span class="symbol">;</span>
<span class="normal">document</span><span class="symbol">.</span><span class="normal">MSpaceApplet</span><span class="symbol">.</span><span class="function">setProperty</span><span class="symbol">(</span><span class="string">"MacroMolecule.Visible"</span><span class="normal"> </span><span class="symbol">,</span><span class="normal"> </span><span class="string">"false"</span><span class="normal"> </span><span class="symbol">)</span><span class="symbol">;</span>
<span class="normal">document</span><span class="symbol">.</span><span class="normal">MSpaceApplet</span><span class="symbol">.</span><span class="function">setProperty</span><span class="symbol">(</span><span class="string">"Water.Visible"</span><span class="normal"> </span><span class="symbol">,</span><span class="normal"> </span><span class="string">"false"</span><span class="normal"> </span><span class="symbol">)</span><span class="symbol">;</span>
<span class="cbracket">}</span>
<span class="keyword">function</span><span class="normal"> </span><span class="function">selectedDrawType</span><span class="symbol">(</span><span class="normal">i</span><span class="symbol">)</span>
<span class="cbracket">{</span>
<span class="normal">  </span><span class="keyword">if</span><span class="symbol">(</span><span class="normal">document</span><span class="symbol">.</span><span class="normal">DrawType</span><span class="symbol">.</span><span class="normal">group1</span><span class="symbol">[</span><span class="normal">i</span><span class="symbol">]</span><span class="symbol">.</span><span class="normal">checked </span><span class="symbol">=</span><span class="symbol">=</span><span class="normal"> </span><span class="keyword">true</span><span class="symbol">)</span>
<span class="normal">  </span><span class="cbracket">{</span>
<span class="normal">    document</span><span class="symbol">.</span><span class="normal">MSpaceApplet</span><span class="symbol">.</span><span class="function">setProperty</span><span class="symbol">(</span><span class="normal"> </span><span class="string">"SecondaryStructure.DrawType"</span><span class="symbol">,</span><span class="normal"> document</span><span class="symbol">.</span><span class="normal">DrawType</span><span class="symbol">.</span><span class="normal">group1</span><span class="symbol">[</span><span class="normal">i</span><span class="symbol">]</span><span class="symbol">.</span><span class="normal">value </span><span class="symbol">)</span><span class="symbol">;</span>
<span class="normal">  </span><span class="cbracket">}</span>
<span class="cbracket">}</span>

<span class="keyword">function</span><span class="normal"> </span><span class="function">selectedColorType</span><span class="symbol">(</span><span class="normal">i</span><span class="symbol">)</span>
<span class="cbracket">{</span>
<span class="normal">  </span><span class="keyword">if</span><span class="symbol">(</span><span class="normal">document</span><span class="symbol">.</span><span class="normal">ColorType</span><span class="symbol">.</span><span class="normal">group1</span><span class="symbol">[</span><span class="normal">i</span><span class="symbol">]</span><span class="symbol">.</span><span class="normal">checked </span><span class="symbol">=</span><span class="symbol">=</span><span class="normal"> </span><span class="keyword">true</span><span class="symbol">)</span>
<span class="normal">  </span><span class="cbracket">{</span>
<span class="normal">    document</span><span class="symbol">.</span><span class="normal">MSpaceApplet</span><span class="symbol">.</span><span class="function">setProperty</span><span class="symbol">(</span><span class="normal"> </span><span class="string">"SecondaryStructure.ColorType"</span><span class="symbol">,</span><span class="normal"> document</span><span class="symbol">.</span><span class="normal">ColorType</span><span class="symbol">.</span><span class="normal">group1</span><span class="symbol">[</span><span class="normal">i</span><span class="symbol">]</span><span class="symbol">.</span><span class="normal">value </span><span class="symbol">)</span><span class="symbol">;</span>
<span class="normal">  </span><span class="cbracket">}</span>
<span class="cbracket">}</span>

<span class="keyword">&lt;/script&gt;</span>
<span class="keyword">&lt;/HEAD&gt;</span>
<span class="keyword">&lt;BODY&gt;</span>
<span class="keyword">&lt;H</span><span class="type">1&gt;MarvinSpace&lt;/H1&gt;</span>


<span class="type">&lt;table</span><span class="normal"> </span><span class="type">cellspacing</span><span class="symbol">=</span><span class="string">"</span><span class="string">0</span><span class="string">"</span><span class="normal"> </span><span class="type">cellpadding</span><span class="symbol">=</span><span class="string">"</span><span class="string">5</span><span class="string">"</span><span class="normal"> </span><span class="type">border</span><span class="symbol">=</span><span class="string">"</span><span class="string">0</span><span class="string">"</span><span class="normal"> </span><span class="type">align</span><span class="symbol">=</span><span class="string">"</span><span class="string">center</span><span class="string">"</span><span class="keyword">&gt;</span>
<span class="keyword">&lt;tr&gt;</span>
<span class="normal">    </span><span class="keyword">&lt;td&gt;</span>
<span class="normal">    </span><span class="keyword">&lt;script</span><span class="normal"> </span><span class="type">language</span><span class="symbol">=</span><span class="string">"</span><span class="string">JavaScript</span><span class="string">"</span><span class="normal"> </span><span class="type">src</span><span class="symbol">=</span><span class="string">"</span><span class="string">../../../marvin.js</span><span class="string">"</span><span class="keyword">&gt;</span><span class="keyword">&lt;/script&gt;</span>
<span class="normal">    </span><span class="keyword">&lt;script</span><span class="normal"> </span><span class="type">language</span><span class="symbol">=</span><span class="string">"</span><span class="string">JavaScript</span><span class="string">"</span><span class="keyword">&gt;</span>
<span class="normal">    </span><span class="comment">&lt;!--</span>
<span class="normal">    mspace_name</span><span class="symbol">=</span><span class="string">"MSpaceApplet"</span><span class="symbol">;</span>
<span class="normal">    </span><span class="function">mspace_begin</span><span class="symbol">(</span><span class="normal">mspace_name</span><span class="symbol">,</span><span class="string">"../../.."</span><span class="symbol">,</span><span class="number">800</span><span class="symbol">,</span><span class="number">500</span><span class="symbol">)</span><span class="symbol">;</span>
<span class="normal">    </span><span class="function">mspace_param</span><span class="symbol">(</span><span class="string">"menubar"</span><span class="symbol">,</span><span class="string">"true"</span><span class="symbol">)</span><span class="symbol">;</span>
<span class="normal">    </span><span class="function">mspace_param</span><span class="symbol">(</span><span class="string">"progressbar"</span><span class="symbol">,</span><span class="string">"true"</span><span class="symbol">)</span><span class="symbol">;</span>
<span class="normal">    </span><span class="function">mspace_param</span><span class="symbol">(</span><span class="string">"popupmenu"</span><span class="symbol">,</span><span class="string">"true"</span><span class="symbol">)</span><span class="symbol">;</span>
<span class="normal">    </span><span class="function">mspace_param</span><span class="symbol">(</span><span class="string">"molecule"</span><span class="symbol">,</span><span class="string">"http://www.chemaxon.com/marvinspace/data/4DFR.pdb"</span><span class="symbol">)</span><span class="symbol">;</span>
<span class="normal">    </span><span class="function">mspace_end</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">;</span>
<span class="comment">    //</span><span class="comment">--&gt;</span>
<span class="normal">    </span><span class="keyword">&lt;/script&gt;</span>
<span class="normal">    </span><span class="keyword">&lt;/td&gt;</span>
<span class="keyword">&lt;/tr&gt;</span>
<span class="keyword">&lt;tr&gt;</span><span class="keyword">&lt;td&gt;</span>
<span class="normal">    </span><span class="keyword">&lt;table</span><span class="normal"> </span><span class="type">align</span><span class="symbol">=</span><span class="string">"</span><span class="string">left</span><span class="string">"</span><span class="keyword">&gt;</span>
<span class="normal">    </span><span class="keyword">&lt;tr&gt;</span><span class="keyword">&lt;th</span><span class="normal"> </span><span class="type">align</span><span class="symbol">=</span><span class="string">"</span><span class="string">left</span><span class="string">"</span><span class="keyword">&gt;</span><span class="normal">Draw types</span><span class="keyword">&lt;/th&gt;</span><span class="keyword">&lt;th&gt;</span><span class="preproc">&amp;nbsp;</span><span class="keyword">&lt;/th&gt;</span><span class="keyword">&lt;th</span><span class="normal"> </span><span class="type">align</span><span class="symbol">=</span><span class="string">"</span><span class="string">left</span><span class="string">"</span><span class="keyword">&gt;</span><span class="normal">Color Types</span><span class="keyword">&lt;/th&gt;</span><span class="keyword">&lt;/tr&gt;</span>
<span class="normal">    </span><span class="keyword">&lt;tr&gt;</span>
<span class="normal">        </span><span class="keyword">&lt;td&gt;</span>
<span class="normal">            </span><span class="keyword">&lt;form</span><span class="normal"> </span><span class="type">action</span><span class="symbol">=</span><span class="string">"</span><span class="string">"</span><span class="normal"> </span><span class="type">name</span><span class="symbol">=</span><span class="string">"</span><span class="string">DrawType</span><span class="string">"</span><span class="keyword">&gt;</span>
<span class="normal">            </span><span class="keyword">&lt;input</span><span class="normal"> </span><span class="type">type</span><span class="symbol">=</span><span class="string">"</span><span class="string">radio</span><span class="string">"</span><span class="normal"> </span><span class="type">name</span><span class="symbol">=</span><span class="string">"</span><span class="string">group1</span><span class="string">"</span><span class="normal"> </span><span class="type">value</span><span class="symbol">=</span><span class="string">"</span><span class="string">Wire</span><span class="string">"</span><span class="normal"> </span><span class="type">onClick</span><span class="symbol">=</span><span class="string">"</span><span class="string">selectedDrawType(0)</span><span class="string">"</span><span class="keyword">&gt;</span><span class="normal"> Wire</span><span class="keyword">&lt;br&gt;</span>
<span class="normal">            </span><span class="keyword">&lt;input</span><span class="normal"> </span><span class="type">type</span><span class="symbol">=</span><span class="string">"</span><span class="string">radio</span><span class="string">"</span><span class="normal"> </span><span class="type">name</span><span class="symbol">=</span><span class="string">"</span><span class="string">group1</span><span class="string">"</span><span class="normal"> </span><span class="type">value</span><span class="symbol">=</span><span class="string">"</span><span class="string">Trace</span><span class="string">"</span><span class="normal"> </span><span class="type">onClick</span><span class="symbol">=</span><span class="string">"</span><span class="string">selectedDrawType(1)</span><span class="string">"</span><span class="keyword">&gt;</span><span class="normal"> Trace</span><span class="keyword">&lt;br&gt;</span>
<span class="normal">            </span><span class="keyword">&lt;input</span><span class="normal"> </span><span class="type">type</span><span class="symbol">=</span><span class="string">"</span><span class="string">radio</span><span class="string">"</span><span class="normal"> </span><span class="type">name</span><span class="symbol">=</span><span class="string">"</span><span class="string">group1</span><span class="string">"</span><span class="normal"> </span><span class="type">value</span><span class="symbol">=</span><span class="string">"</span><span class="string">Tube</span><span class="string">"</span><span class="normal"> </span><span class="type">onClick</span><span class="symbol">=</span><span class="string">"</span><span class="string">selectedDrawType(2)</span><span class="string">"</span><span class="keyword">&gt;</span><span class="normal"> Tube</span><span class="keyword">&lt;br&gt;</span>
<span class="normal">            </span><span class="keyword">&lt;input</span><span class="normal"> </span><span class="type">type</span><span class="symbol">=</span><span class="string">"</span><span class="string">radio</span><span class="string">"</span><span class="normal"> </span><span class="type">name</span><span class="symbol">=</span><span class="string">"</span><span class="string">group1</span><span class="string">"</span><span class="normal"> </span><span class="type">value</span><span class="symbol">=</span><span class="string">"</span><span class="string">Ribbon</span><span class="string">"</span><span class="normal"> </span><span class="type">onClick</span><span class="symbol">=</span><span class="string">"</span><span class="string">selectedDrawType(3)</span><span class="string">"</span><span class="keyword">&gt;</span><span class="normal"> Ribbon </span><span class="keyword">&lt;br&gt;</span>
<span class="normal">            </span><span class="keyword">&lt;input</span><span class="normal"> </span><span class="type">type</span><span class="symbol">=</span><span class="string">"</span><span class="string">radio</span><span class="string">"</span><span class="normal"> </span><span class="type">name</span><span class="symbol">=</span><span class="string">"</span><span class="string">group1</span><span class="string">"</span><span class="normal"> </span><span class="type">value</span><span class="symbol">=</span><span class="string">"</span><span class="string">Cartoon</span><span class="string">"</span><span class="normal"> </span><span class="type">checked</span><span class="symbol">=</span><span class="string">"</span><span class="string">true</span><span class="string">"</span><span class="normal"> </span><span class="type">onClick</span><span class="symbol">=</span><span class="string">"</span><span class="string">selectedDrawType(4)</span><span class="string">"</span><span class="keyword">&gt;</span><span class="normal"> Cartoon</span><span class="keyword">&lt;br&gt;</span>
<span class="normal">            </span><span class="keyword">&lt;/form&gt;</span>
<span class="normal">        </span><span class="keyword">&lt;/td&gt;</span>
<span class="normal">        </span><span class="keyword">&lt;td</span><span class="normal"> </span><span class="type">width</span><span class="symbol">=</span><span class="string">"</span><span class="string">50</span><span class="string">"</span><span class="keyword">&gt;</span><span class="preproc">&amp;nbsp;</span><span class="keyword">&lt;/td&gt;</span>
<span class="normal">        </span><span class="keyword">&lt;td&gt;</span>
<span class="normal">        </span><span class="keyword">&lt;form</span><span class="normal"> </span><span class="type">action</span><span class="symbol">=</span><span class="string">"</span><span class="string">"</span><span class="normal"> </span><span class="type">name</span><span class="symbol">=</span><span class="string">"</span><span class="string">ColorType</span><span class="string">"</span><span class="keyword">&gt;</span>
<span class="normal">        </span><span class="keyword">&lt;input</span><span class="normal"> </span><span class="type">type</span><span class="symbol">=</span><span class="string">"</span><span class="string">radio</span><span class="string">"</span><span class="normal"> </span><span class="type">name</span><span class="symbol">=</span><span class="string">"</span><span class="string">group1</span><span class="string">"</span><span class="normal"> </span><span class="type">value</span><span class="symbol">=</span><span class="string">"</span><span class="string">Constant</span><span class="string">"</span><span class="normal"> </span><span class="type">onClick</span><span class="symbol">=</span><span class="string">"</span><span class="string">selectedColorType(0)</span><span class="string">"</span><span class="keyword">&gt;</span><span class="normal"> Constant</span><span class="keyword">&lt;br&gt;</span>
<span class="normal">        </span><span class="keyword">&lt;input</span><span class="normal"> </span><span class="type">type</span><span class="symbol">=</span><span class="string">"</span><span class="string">radio</span><span class="string">"</span><span class="normal"> </span><span class="type">name</span><span class="symbol">=</span><span class="string">"</span><span class="string">group1</span><span class="string">"</span><span class="normal"> </span><span class="type">value</span><span class="symbol">=</span><span class="string">"</span><span class="string">Residue</span><span class="string">"</span><span class="normal"> </span><span class="type">onClick</span><span class="symbol">=</span><span class="string">"</span><span class="string">selectedColorType(1)</span><span class="string">"</span><span class="keyword">&gt;</span><span class="normal"> Residue</span><span class="keyword">&lt;br&gt;</span>
<span class="normal">        </span><span class="keyword">&lt;input</span><span class="normal"> </span><span class="type">type</span><span class="symbol">=</span><span class="string">"</span><span class="string">radio</span><span class="string">"</span><span class="normal"> </span><span class="type">name</span><span class="symbol">=</span><span class="string">"</span><span class="string">group1</span><span class="string">"</span><span class="normal"> </span><span class="type">value</span><span class="symbol">=</span><span class="string">"</span><span class="string">Chain</span><span class="string">"</span><span class="normal"> </span><span class="type">checked</span><span class="symbol">=</span><span class="string">"</span><span class="string">true</span><span class="string">"</span><span class="normal"> </span><span class="type">onClick</span><span class="symbol">=</span><span class="string">"</span><span class="string">selectedColorType(2)</span><span class="string">"</span><span class="keyword">&gt;</span><span class="normal"> Chain</span><span class="keyword">&lt;br&gt;</span>
<span class="normal">        </span><span class="keyword">&lt;input</span><span class="normal"> </span><span class="type">type</span><span class="symbol">=</span><span class="string">"</span><span class="string">radio</span><span class="string">"</span><span class="normal"> </span><span class="type">name</span><span class="symbol">=</span><span class="string">"</span><span class="string">group1</span><span class="string">"</span><span class="normal"> </span><span class="type">value</span><span class="symbol">=</span><span class="string">"</span><span class="string">SecondaryStructure</span><span class="string">"</span><span class="normal"> </span><span class="type">onClick</span><span class="symbol">=</span><span class="string">"</span><span class="string">selectedColorType(3)</span><span class="string">"</span><span class="keyword">&gt;</span><span class="normal"> Secondary structure</span><span class="keyword">&lt;br&gt;</span>
<span class="normal">        </span><span class="keyword">&lt;input</span><span class="normal"> </span><span class="type">type</span><span class="symbol">=</span><span class="string">"</span><span class="string">radio</span><span class="string">"</span><span class="normal"> </span><span class="type">name</span><span class="symbol">=</span><span class="string">"</span><span class="string">group1</span><span class="string">"</span><span class="normal"> </span><span class="type">value</span><span class="symbol">=</span><span class="string">"</span><span class="string">B-factor</span><span class="string">"</span><span class="normal"> </span><span class="type">onClick</span><span class="symbol">=</span><span class="string">"</span><span class="string">selectedColorType(4)</span><span class="string">"</span><span class="keyword">&gt;</span><span class="normal"> B-factor</span><span class="keyword">&lt;br&gt;</span>
<span class="normal">        </span><span class="keyword">&lt;input</span><span class="normal"> </span><span class="type">type</span><span class="symbol">=</span><span class="string">"</span><span class="string">radio</span><span class="string">"</span><span class="normal"> </span><span class="type">name</span><span class="symbol">=</span><span class="string">"</span><span class="string">group1</span><span class="string">"</span><span class="normal"> </span><span class="type">value</span><span class="symbol">=</span><span class="string">"</span><span class="string">Rainbow</span><span class="string">"</span><span class="normal"> </span><span class="type">onClick</span><span class="symbol">=</span><span class="string">"</span><span class="string">selectedColorType(5)</span><span class="string">"</span><span class="keyword">&gt;</span><span class="normal"> Rainbow</span><span class="keyword">&lt;br&gt;</span>
<span class="normal">        </span><span class="keyword">&lt;/form&gt;</span>
<span class="normal">        </span><span class="keyword">&lt;/td&gt;</span>
<span class="normal">    </span><span class="keyword">&lt;/tr&gt;</span>
<span class="normal">    </span><span class="keyword">&lt;/table&gt;</span>
<span class="keyword">&lt;/td&gt;</span><span class="keyword">&lt;/tr&gt;</span>
<span class="keyword">&lt;/table&gt;</span>

<span class="keyword">&lt;script&gt;</span>
<span class="function">showSecondary</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">;</span>
<span class="keyword">&lt;/script&gt;</span>

<span class="keyword">&lt;/BODY&gt;</span>
<span class="keyword">&lt;/HTML&gt;</span>
</tt></pre>
</body>
</html>
